package com.deductive.domain.wq;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 卫生统计表
 * @TableName disposition_wq_wstj
 */
@TableName(value ="disposition_wq_wstj")
@Data
public class DispositionWqWstj implements Serializable {
    /**
     * id
     */
    @TableId(value = "id",type= IdType.AUTO)
    private Integer id;

    /**
     * 关联的推演工程
     */
    @TableField(value = "deductive_engineering")
    private String deductiveEngineering;

    /**
     * 统计对象
     */
    @TableField(value = "statistical_subject")
    private String statisticalSubject;

    /**
     * 统计数值
     */
    @TableField(value = "statistical_figures")
    private String statisticalFigures;

    /**
     * 计量单位
     */
    @TableField(value = "measurement_units")
    private String measurementUnits;

    /**
     * 统计时间
     */
    @TableField(value = "statistical_time")
    private String statisticalTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DispositionWqWstj other = (DispositionWqWstj) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDeductiveEngineering() == null ? other.getDeductiveEngineering() == null : this.getDeductiveEngineering().equals(other.getDeductiveEngineering()))
            && (this.getStatisticalSubject() == null ? other.getStatisticalSubject() == null : this.getStatisticalSubject().equals(other.getStatisticalSubject()))
            && (this.getStatisticalFigures() == null ? other.getStatisticalFigures() == null : this.getStatisticalFigures().equals(other.getStatisticalFigures()))
            && (this.getMeasurementUnits() == null ? other.getMeasurementUnits() == null : this.getMeasurementUnits().equals(other.getMeasurementUnits()))
            && (this.getStatisticalTime() == null ? other.getStatisticalTime() == null : this.getStatisticalTime().equals(other.getStatisticalTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDeductiveEngineering() == null) ? 0 : getDeductiveEngineering().hashCode());
        result = prime * result + ((getStatisticalSubject() == null) ? 0 : getStatisticalSubject().hashCode());
        result = prime * result + ((getStatisticalFigures() == null) ? 0 : getStatisticalFigures().hashCode());
        result = prime * result + ((getMeasurementUnits() == null) ? 0 : getMeasurementUnits().hashCode());
        result = prime * result + ((getStatisticalTime() == null) ? 0 : getStatisticalTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", deductiveEngineering=").append(deductiveEngineering);
        sb.append(", statisticalSubject=").append(statisticalSubject);
        sb.append(", statisticalFigures=").append(statisticalFigures);
        sb.append(", measurementUnits=").append(measurementUnits);
        sb.append(", statisticalTime=").append(statisticalTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}